package com.sb.redis.controller;

import com.sb.redis.util.RedisUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class RedisHomeController {

    @Resource
    private RedisUtil redisUtil;

    @GetMapping("/")
    public String home(){
        redisUtil.put("ceshi","这是测试数据");
        return String.valueOf(redisUtil.get("ceshi"));
    }
}
